libmyc.so:add.o sub.o
	gcc -shared -o $@ $^
add.o:add.c
	gcc -fPIC -c $<
sub.o:sub.c
	gcc -fPIC -c $<

.PHONY:output
output:
	mkdir -p lib/include
	mkdir -p lib/mylib1
	cp -f *.h lib/include
	cp -f *.so lib/mylib1
	tar czf lib.tgz lib

.PHONY:clean
clean:
	rm -rf *.o *.so lib lib.tgz 
